#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#include "uthash.h"

bool canPlaceFlowers(int* flowerbed, int flowerbedSize, int n);

int main()
{
	return 0;
}

bool canPlaceFlowers(int* flowerbed, int flowerbedSize, int n) {
	int gap = 1, place = 0;
	for (int i = 0, cur; i < flowerbedSize; i++) {
		cur = flowerbed[i];
		if (cur == 1)
			gap = 0;
		else if (cur == 0) {
			gap++;
			if (gap == 3) {
				gap = 1;
				place++;
			}
		}
	}

	if (gap == 2) place++;
	return place >= n;
}
